package com.ykt.controller;

import java.util.HashMap;
import java.util.Map;

import com.ykt.service.Ys7Service;
import com.ykt.vo.ResultVo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 萤石云视频操作
 *
 * @author long.hua
 * @version 1.0.0
 * @since 2015-12-21 23:28
 */
public class Ys7Controller extends BaseController{
    private static final Logger LOGGER = LoggerFactory.getLogger(Ys7Controller.class);


    private Ys7Service ys7Service = enhance(Ys7Service.class.getName(), Ys7Service.class);


    // 获取服务器时间范例入口
    public void ysServerTime() {
        long time = ys7Service.getServerTime();
        
        Map<String, Object> resultMap = new HashMap<>();
        resultMap.put("ysServerTime",time);
        
        returnJson(ResultVo.success(resultMap));
    }

    // 获得请求token
    public void accessToken(){
        String ysToken = ys7Service.getAccessToken();
        
        Map<String, Object> resultMap = new HashMap<>();
        resultMap.put("ysToken",ysToken);
        
        returnJson(ResultVo.success(resultMap));
    }


}
